﻿Imports System.Resources
Imports System.Reflection

Public NotInheritable Class Splash
    Private GlobalRM As New ResourceManager("WebSitemap_Localizer.Global", Assembly.GetExecutingAssembly())

    Private Sub Splash_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not String.IsNullOrEmpty(My.Settings.Language) Then
            FormTranslator.ChangeFormLanguage(Me, My.Settings.Language)
        End If

        If My.Application.Info.Title <> "" Then
            ApplicationTitle.Text = My.Application.Info.Title
        Else
            ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        End If

        Dim versionText As String = GlobalRM.GetString("Version") & " {0}.{1:00}.{2}.{3}"
        Version.Text = System.String.Format(versionText, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

        Copyright.Text = My.Application.Info.Copyright
    End Sub
End Class
